/*
 * AdaptiveThreshold.h
 *
 *  Created on: 16/lug/2014
 *      Author: va2013
 */

#ifndef ADAPTIVETHRESHOLD_H_
#define ADAPTIVETHRESHOLD_H_

#include "Threshold.h"
#include "HSVThreshConfig.h"

class AdaptiveThreshold: public Threshold {
private:
	HSVThreshConfig* config;

	int getLinThreshValue(double m, double b, double x);
	int getExpThreshValue(double m, double b, double x);
	void adaptiveThreshold(const Mat& image, Mat& thresholded, int kernelRows=10, int kernelCols=10, double defaultMean = 0);
public:
	AdaptiveThreshold(HSVThreshConfig* config);
	virtual ~AdaptiveThreshold();
	void getThresholdedImage(Mat inputImage, Mat& outputImage, int kernelRows=10, int kernelCols=10, double defaultMean = 0);
};

#endif /* ADAPTIVETHRESHOLD_H_ */
